package test18;

import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: ws
 * Date: 2023-04-09
 * Time: 15:45
 */
import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int a = 0;
        int b = 1;
        while (n-- > 0) {
            int temp = b;
            b = a + b;
            a = temp;
        }
        System.out.println(a);
    }
}
